<div class="states index">
    <h2 class="title"><?php __('States'); ?></h2>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th><?php echo $this->Paginator->sort('id'); ?></th>
            <th><?php echo $this->Paginator->sort('name'); ?></th>
            <th><?php echo $this->Paginator->sort('status'); ?></th>
            <th><?php echo $this->Paginator->sort('created'); ?></th>
            <th><?php echo $this->Paginator->sort('modified'); ?></th>
            <th class="actions"><?php __('Actions'); ?></th>
        </tr>
        <?php
        $i = 0;
        foreach($states as $state):
            $class = null;
            if( $i++ % 2 == 0 )
            {
                $class = ' class="altrow"';
            }
        ?>
            <tr<?php echo $class; ?>>
                <td><?php echo $state['State']['id']; ?>&nbsp;</td>
                <td><?php echo $state['State']['name']; ?>&nbsp;</td>
                <td><?php echo $state['State']['status']; ?>&nbsp;</td>
                <td><?php echo $state['State']['created']; ?>&nbsp;</td>
                <td><?php echo $state['State']['modified']; ?>&nbsp;</td>
                <td class="actions">
                <?php echo $this->Html->link(__('View', true), array('action' => 'view', $state['State']['id'])); ?>
                <?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $state['State']['id'])); ?>
                <?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $state['State']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $state['State']['id'])); ?>
            </td>
        </tr>
        <?php endforeach; ?>
    </table>
    <p>
        <?php
            echo $this->Paginator->counter(array(
                'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
            ));
        ?>
    </p>

    <div class="paging">
        <?php
                echo $this->Paginator->prev("« " . __('previous', true), array(), null, array('class' => 'disabled'));
                echo "&nbsp;&nbsp;";
                echo $this->Paginator->numbers(array(
                    'separator' => "&nbsp;&nbsp;"
                ));
                echo "&nbsp;&nbsp;";
                echo $this->Paginator->next(__('next', true) . " »", array(), null, array('class' => 'disabled'));
        ?>
    </div>
</div>